import axios from '~/plugins/axios';

//慧拨电话查询接口
export const searchTelList  = function ({commit, state}, preload) {
    return axios.post(process.env.baseUrl + "/recordNo/list",preload || {})
}

//慧拨电话状态接口 typeId=202
export const telStatus  = function ({commit, state}, preload) {
    return axios.get(process.env.baseUrl + "/dicttype/list",{params:{typeId: 202}})
}

//慧拨电话新增接口
export const insertHBTel  = function ({commit, state}, preload) {
    return axios.post(process.env.baseUrl + "/recordNo/insert",preload || {})
}

//慧拨电话删除接口
export const deleteHBTel  = function ({commit, state}, preload) {
    return axios.post(process.env.baseUrl + "/recordNo/delete",preload || {})
}

//慧拨电话分配接口
export const allocatingHBTel  = function ({commit, state}, preload) {
    return axios.post(process.env.baseUrl + "/recordNo/allocating",preload || {})
}

//慧拨电话归还接口
export const returnHBTel  = function ({commit, state}, preload) {
    return axios.post(process.env.baseUrl + "/recordNo/returnNumber",preload || {})
}

/**
 * 用户列表接口
 *
 * @param commit
 * @param state
 * @param preload
 */
export const getHBUserData = function({commit, state}, preload) {
    return axios.get(process.env.baseUrl + "/member/list", {
        params: preload || {}
    })
}

//慧拨电话是否入库验证接口
export const checkHBTel  = function ({commit, state}, preload) {
    return axios.post(process.env.baseUrl + "/recordNo/checkNum",preload || {})
}